home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RING_TST.QM < prev    next >
Text File  |  1991-07-03  |  15KB  |  365 lines

  1. *                                                                July 2, 1991
  2. * ┌──────────────────────── RingLoop Tests (Results) ────────────────────────┐
  3. * │      Beep/        Ring Loop Time
  4. * │      Fail           seconds
  5. * │Macro Conds. Bytes (a)  (b)  (c)                   Test
  6. * │===== =====  ===== ===  ===  ==== ========================================
  7. * │
  8. * │                         Recommended Techniques
  9. * │                         ----------------------
  10. * │@(e)■  f      25   6.0  1.4  0.35 CursorLt
  11. * │@(j)■  ok     34    nt  1.8  0.50 CursorDn/Up, Scr Buf (CurrentFileName 2x)
  12. * │
  13. * │                           Other Techniques
  14. * │                           ----------------
  15. * │@(a)   f      29  41.5  4.1  0.65 Scr Buff (BackSpace)
  16. * │@(b)   f,b    30  29.5  6.0  1.10 Find "path:\NUL"
  17. * │@(c)   f,b    28  15.5  3.2  0.60 Find Dummy Character
  18. * │@(d)   f      24  12.0  3.6  0.80 EndFile BegFile
  19. * │@(f)   ok     29  46.0  4.6  0.75 Scr Buff (CurrentFileName 2x)
  20. * │@(g)   f      36   7.0  1.7  0.40 CursorDn/Up CursorLt EndLine/BegLine
  21. * │@(h)   f      30   7.0  1.7  0.40 CursorDn/Up CursorLt
  22. * │@(i)   f      22     f  1.6  0.40 CursorDn/Up
  23. * │
  24. * │ (Purpose) and Objectives of Tests
  25. * │ (Recommendations) and Conclusions:
  26. * │ (Macros)
  27. * │ (Description) of Tests
  28. * │ (Fail) Conditions
  29. * │ (Equipment)/Software for Testing
  30. * │ (Footnotes)
  31. * │
  32. * └──────────────────────────────────────────────────────────────────────────┘
  33.  
  34. *   (Purpose) and Objectives of Tests
  35. *   ----------------------------------
  36.  
  37. * The purpose of these tests was find the most effective QEdit macro
  38. * technique to execute undetermined tasks in each file in the ring. My
  39. * ideas and those of John Goodman, Kyle Watkins and Tim Farley were
  40. * tested in very simple macros that loop through the QEdit file ring
  41. * once and only once.  The objectives were to find a technique that was
  42. * fast, visibly and audibly pleasing (no beeps), and would not fail
  43. * under any circumstances.
  44.  
  45. *  (Recommendations) and Conclusions
  46. *  ---------------------------------
  47. *  1)   -   Use macro @e technique (developed by Kyle Watkins of
  48. *           Semware) when loading files from the command line for
  49. *           subsequent macro processing of all files in the ring,
  50. *           like the search/replace macros in SRCHxx.QM in AMACxx.ZIP.
  51. *           Macro @e only fails if the cursor is in column 2 in any
  52. *           file in ring and is the fastest.
  53.  
  54. *  2)   -   Use macro @j technique when editing files for macro
  55. *           processing of all files in the ring. It is slightly slower
  56. *           and larger (9 bytes) than @e, but there are *no* file
  57. *           conditions or cursor positions which cause this macro
  58. *           technique to fail. It is foolproof.
  59.  
  60. *  (Footnotes)
  61. *  -----------
  62. *  b  - Macros beep if Find beep set on in QCONFIG
  63. *  f  - Macro fail conditions
  64. *  nt - Not tested
  65. *  ok - Will not fail
  66.  
  67. * (Description) of Tests
  68. * -----------------------
  69. * Three different tests were used.  Time was measured manually to the
  70. * nearest second using the second hand clock hand. Total run time was
  71. * divided by the number of times the macro was executed consecutively
  72. * without stopping to arrive at a relative time comparison for each
  73. * macro technique.  The technique used in ring looping portion of the
  74. * macros in RINGxx.QM was proposed later by Richard Blackburn and was
  75. * not tested in this series.
  76.  
  77. *  Test a   -  500 files containing one line "test", 6 bytes each
  78. *                   (Time for 1 repeat, accuracy +/- 1.0 seconds)
  79. *  Test b   -  100 files containing two lines "test", 14 bytes each
  80. *                   (Time for 10 repeats ÷ 10, accuracy +/- 0.10 seconds)
  81. *  Test c   -   10 files, 10k each, total 100k
  82. *                   (Time for 20 repeats ÷ 20, accuracy +/- 0.05 seconds)
  83.  
  84. *  Macro (Fail) Conditions
  85. *  ------------------------
  86. *       @a fails if file name NU is loaded
  87. *       @b fails if "path:\NUL" exists in any file in ring
  88. *       @c fails if dummy character #250 exists in any loaded file
  89. *       @d fails if any empty file is loaded in ring
  90. *       @e fails if cursor is in column 2 in any file in ring
  91. *       @g fails if cursor is in column 2 in any blank file in ring
  92. *       @h fails if cursor is in column 2 in any single line file in ring
  93. *       @i fails if any single line file in ring, empty or not
  94.  
  95. *  (Equipment)/Software for Testing
  96. *  ---------------------------------
  97. *       10 mhz XT clone with 12 mhz Everex accelerator board (SI 10.4)
  98. *       5 megs ram with 3 AST ram boards (wish I could fit more in)
  99. *       Miniscribe 40 meg as E: (17.2 meg, data) and G: (26.6 meg, files)
  100. *       Seagate 20 meg as F: (used to incrementally backup E: and G:)
  101. *       360k floppy as A:
  102. *       720k floppy as B:
  103. *       Everex 2400 baud internal modem
  104. *       Magnavox VGA paper white Monitor
  105. *       Logix VGA board
  106. *       PC Kwik (1.7 meg cache) configured C: and D: ram disks
  107. *       PCED
  108. *       NEWKEY
  109.  
  110. *                           Test (Macros)
  111. *                          ===============
  112. * 
  113. * ----------------------------------------------------------------------
  114. * @(a) Scratch Buffer BackSpace, Fails if file name NU is loaded
  115. *      (John Goodman technique)
  116. * ----------------------------------------------------------------------
  117. @a  MacroBegin
  118.     UnMarkBlock
  119.     PrevFile
  120.     EditFile "NUL" Return
  121.     DropAnchor
  122.     StoreScrBuff
  123.       CurrentFileName
  124.       BackSpace
  125.       Return
  126.  RINGLOOP:
  127.     NextFile
  128.     GetScrBuff
  129.       CurrentFileName
  130.       BackSpace
  131.       Return
  132.     JFalse RINGLOOP:
  133.  END:
  134.     Quit
  135.     NextFile
  136. * 29 bytes Fri  05-17-1991  00:35:21 (TH/JG)
  137.  
  138. * 
  139. * ----------------------------------------------------------------------
  140. * @(b) Find CurrentFileName, A "beeping" method, Fails if "path:\NUL"
  141. *      exists in any file in ring (John Goodman technique)
  142. * ----------------------------------------------------------------------
  143. @b  MacroBegin
  144.     PrevFile
  145.     EditFile "NUL" Return
  146.     CurrentFileName
  147.  RINGLOOP:
  148.     NextFile
  149.     UnmarkBlock
  150.     MarkLine
  151.     Find CurrentFileName Return "LB" Return
  152.     JFalse RINGLOOP:
  153.  END:
  154.     Quit
  155.     NextFile
  156. * 30 bytes Fri  05-17-1991  14:31:01 (TH/JG)
  157.  
  158. * 
  159. * ----------------------------------------------------------------------
  160. * @(c) Find Dummy Character, A "beeping" method, Will not fail unless
  161. *      dummy character #250  exists in any loaded file in th ring
  162. *      (John Goodman technique)
  163. * ----------------------------------------------------------------------
  164. @c  MacroBegin
  165.     PrevFile
  166.     EditFile "NUL" Return
  167.     #250
  168.  RINGLOOP:
  169.     NextFile
  170.     Find #250 Return "B" Return
  171.     JFalse RINGLOOP:
  172.  END:
  173.     Quit
  174.     NextFile
  175. * 28 bytes Fri  05-17-1991  14:32:29 (TH/JG)
  176.  
  177. * 
  178. * ----------------------------------------------------------------------
  179. * @(d) EndFile/BegFile suggested by Tim Farley, Fails if any empty file
  180. *      is loaded in ring
  181. * ----------------------------------------------------------------------
  182. @d  MacroBegin
  183.     UnMarkBlock
  184.     DropAnchor
  185.     PrevFile
  186.     EditFile "NUL" Return
  187.  RINGLOOP:
  188.     NextFile
  189.     EndFile BegFile
  190.     JTrue RINGLOOP:
  191.  END:
  192.     Quit
  193.     GoToBlockBeg
  194.     UnMarkBlock
  195. *
  196. * 24 bytes Fri  05-17-1991  14:33:47 (TH)
  197.  
  198. * 
  199. * ----------------------------------------------------------------------
  200. * @(e) CursorLeft, Fails only if cursor is in column 2 in any file
  201. *      in ring (Kyle Watkins' technique)
  202. * ----------------------------------------------------------------------
  203. @e  MacroBegin
  204.     PrevFile                    * Position to load NUL file
  205.     EditFile "NUL" Return       * Load NUL file
  206.       CursorRight               * Put cursor in column 2 of NUL file
  207.  RINGLOOP:
  208.     NextFile                    * Move to next file in ring
  209.     CursorLeft                  * See if we can move cursor left
  210.     Jfalse RINGLOOP:            * If we can't move cursor left, it's not
  211.                                 *   the NUL file, then move to next file
  212.     CursorLeft                  * If we could move cursor left, see if we
  213.                                 *  can do it again
  214.     JTrue RINGLOOP:             * If we can, we are not in the NUL file,
  215.                                 *  and move to next file
  216.  END:                           *ELSE test was false and we must be in
  217.                                 *  the NUL file
  218.     Quit                        * Quit it
  219.     NextFile                    * Move to file we started in
  220. *
  221. * 25 bytes Fri  05-17-1991  09:00:37 (TH)
  222.  
  223. * 
  224. * ----------------------------------------------------------------------
  225. * @(f) Scratch Buffer CurrentFileName 2x, Will not fail
  226. *      (John Goodman's technique)
  227. * ----------------------------------------------------------------------
  228.  
  229. @f  MacroBegin
  230.     UnMarkBlock                 * Unmark blocks
  231.     PrevFile                    * Position to load NUL file
  232.     EditFile "NUL" Return       * Load NUL file
  233.     DropAnchor                  * Need a block marker for StoreScrBuff
  234.     StoreScrBuff                * Create a buffer named
  235.       CurrentFileName           *  "path:\NULpath:\NUL" eg
  236.       CurrentFileName           *  "c:\nulc:\nul"
  237.       Return                    *
  238.  RINGLOOP:                      *
  239.     NextFile                    * Go to next file in ring
  240.     GetScrBuff                  * Try retrieving a buffer named
  241.       CurrentFileName           *  current file's name 2x, eg
  242.       CurrentFileName           * "c:\current.extc:\current.ext"
  243.       Return                    *
  244.     JFalse RINGLOOP:            * Buffer only exists for "c:\nulc:\nul"
  245.                                 * If test is false, we are not yet in
  246.                                 *  the NUL file, move to next file
  247.  END:                           *ELSE test was true and we must be in
  248.                                 *  the NUL file
  249.     Quit                        * Quit it
  250.     NextFile                    * Move to file we started in
  251. *
  252. * 29 bytes Sat  05-18-1991  01:33:57 (TH/JG)
  253.  
  254. * 
  255. * ----------------------------------------------------------------------
  256. * @(g) CursorDown/Up CursorLeft EndLine/Begline,
  257. *      Fails if cursor is in column 2 in any blank file in ring
  258. * ----------------------------------------------------------------------
  259. @g  MacroBegin
  260.     UnMarkBlock                 *
  261.     PrevFile                    * Position to load NUL file
  262.     EditFile "NUL" Return       * Load NUL file
  263.       CursorRight               * Put cursor in column 2 of NUL file
  264.  RINGLOOP:                      *
  265.     NextFile                    * Move to next file in ring
  266.     CursorDown CursorUp         * Test if file has more than one line
  267.     JTrue RINGLOOP:             * If so, move to next file
  268.     CursorLeft                  * See if we can move cursor left
  269.     Jfalse RINGLOOP:            * If we can't move cursor left, it's not
  270.                                 *   the NUL file, then move to next file
  271.     CursorLeft                  * If we could move cursor left, see if we
  272.                                 *  can do it again
  273.     JTrue RINGLOOP:             * If we can, we are not in the NUL file,
  274.                                 *  and move to next file
  275.     EndLine BegLine             * If we could not move cursor left, test
  276.                                 *  if line has any text
  277.     JTrue RINGLOOP:             * If line has text it is not the NUL file
  278.                                 *  but a single line file with text that
  279.                                 *  had the cursor in column 2, move to next
  280.                                 *  file
  281.  END:                           *ELSE test was false and we must be in
  282.                                 *  the NUL file
  283.     Quit                        * Quit it
  284.     NextFile                    * Move to file we started in
  285. * 36 bytes Fri  05-17-1991  10:33:44 (TH)
  286.  
  287. * 
  288. * ----------------------------------------------------------------------
  289. * @(h) CursorUp/Down Cursorleft, Fails if any single line file in ring
  290. *      has cursor in col 2
  291. * ----------------------------------------------------------------------
  292. @h  MacroBegin
  293.     PrevFile
  294.     EditFile "NUL" Return
  295.       CursorRight
  296.  RINGLOOP:
  297.     NextFile
  298.     CursorDown CursorUp         * pass all multi line
  299.     JTrue RINGLOOP:
  300.     CursorLeft
  301.     Jfalse RINGLOOP:
  302.     CursorLeft
  303.     JTrue RINGLOOP:
  304.  END:
  305.     Quit
  306.     NextFile
  307. *
  308. * 30 bytes Fri  05-17-1991  09:07:09 (TH)
  309.  
  310. * 
  311. * ----------------------------------------------------------------------
  312. * @(i) CursorDown/Up, Fails only if single line file in ring
  313. * ----------------------------------------------------------------------
  314. @i  MacroBegin
  315.     PrevFile                    * Position to load NUL file
  316.     EditFile "NUL" Return       * Load NUL file
  317.  RINGLOOP:
  318.     NextFile                    * Move to next file in ring
  319.     CursorDown CursorUp         * Test if file has more than one line
  320.     JTrue RINGLOOP:             * If if does, we are not in the
  321.                                 *  NUL file, move to next file
  322.  END:                           *ELSE test was false and we must be in
  323.                                 *  a file with only one line
  324.     Quit                        * Quit it
  325.     NextFile                    * Move to file we started in
  326. *
  327. * 21 bytes Sun  05-19-1991  11:48:37 (TH)
  328.  
  329. * 
  330. * ----------------------------------------------------------------------
  331. * @(j) Scratch Buffer CurrentFileName 2x, CursorDown/Up, Fastest RingLoop
  332. *      Technique that will not fail (John Goodman's Scratch Buffer
  333. *      technique use with CursorDown CursorUp)
  334. * ----------------------------------------------------------------------
  335.  
  336. @j  MacroBegin
  337.     UnMarkBlock                 * Unmark blocks
  338.     PrevFile                    * Position to load NUL file
  339.     EditFile "NUL" Return       * Load NUL file
  340.     DropAnchor                  * Need a block marker for StoreScrBuff
  341.     StoreScrBuff                * Create a buffer named
  342.       CurrentFileName           *  "path:\NULpath:\NUL" eg
  343.       CurrentFileName           *  "c:\nulc:\nul"
  344.       Return                    *
  345.  RINGLOOP:                      *
  346.     NextFile                    * Go to next file in ring
  347.     CursorDown CursorUp         * Test if file has more than one line
  348.     JTrue RINGLOOP:             * If if does, we are not in the
  349.                                 *  NUL file, move to next file
  350.     GetScrBuff                  *ELSE try retrieving a buffer named
  351.       CurrentFileName           *  current file's name 2x, eg
  352.       CurrentFileName           * "c:\current.extc:\current.ext"
  353.       Return                    *
  354.     JFalse RINGLOOP:            * Buffer only exists for "c:\nulc:\nul"
  355.                                 * If test is false, we are not yet in
  356.                                 *  the NUL file, move to next file
  357.  END:                           *ELSE test was true and we must be in
  358.                                 *  the NUL file
  359.     Quit                        * Quit it
  360.     NextFile                    * Move to file we started in
  361. *
  362. * 34 bytes Sun  05-19-1991  01:02:05 (TH/JG)
  363.  
  364. * Tom Hogshead
  365.